Conversation
| @@ -1,2 +1,3 @@ | |||
| export { default } from './CozyPouchLink' | |||
| export { default as SQLiteQuery } from './db/sqlite/sqliteDb' | |||
| export { default as IndexedDBQueryEngine } from './db/idb/idb' | |||
There was a problem hiding this comment.
The naming is not homogenous with SQLiteQuery (you added the Engine suffix)
| const request = version | ||
| ? indexedDB.open(fullDbName, version) | ||
| : indexedDB.open(fullDbName) |
There was a problem hiding this comment.
Version is used there, but we never provide it? Do we expect to use it in the future?
There was a problem hiding this comment.
Yes it is never provided, but it might be (and I tried few things during tests), so I prefer to keep it for now
| } | ||
|
|
||
| async openDB(dbName, version = undefined, { forceName = false } = {}) { | ||
| return new Promise((resolve, reject) => { |
There was a problem hiding this comment.
openDB() is not declared as async in dbInterfaces file, but more important, it is not awaited in PouchManager
| return resp | ||
| } catch (err) { | ||
| logger.error(err) | ||
| return null |
There was a problem hiding this comment.
There was a problem hiding this comment.
Right, I fixed the interface, it was already returning null in sqlite
| limit, | ||
| partialFilter, | ||
| skip = 0, | ||
| shouldRecreateIndex = false |
There was a problem hiding this comment.
I don't find any code that set shouldRecreateIndex. Is that a change that will be implemented later?
There was a problem hiding this comment.
It is helpful to quickly set this for debug purposes
PouchDB sometimes badly handle the `$gt: null` selector, thus we transform it into `$gt: ''` See apache/pouchdb#7192
This is the equivalent of #1598 , but for IndexedDB, so this time for browser.
I will complete with performances measure later